﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SES.CMS.BL;
using SES.CMS.DO;

namespace DoThiBanMai
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string CurrentUrl = "http://" + Request.Url.Host + Request.RawUrl;
                hplFacebook.NavigateUrl = hplFacebook.NavigateUrl + CurrentUrl;
                hplGoogle.NavigateUrl = hplGoogle.NavigateUrl + CurrentUrl;
                hplTwitter.NavigateUrl = hplTwitter.NavigateUrl + CurrentUrl;
                ltrFooterInfo.Text = new sysConfigBL().Select(new sysConfigDO { ConfigID = 2 }).ConfigValue;
                loadMoreInfo();
                pnlQCPhai.Visible = new sysConfigBL().Select(new sysConfigDO { ConfigID = 12 }).IsActive;
              //  imgRight.ImageUrl = "/Media/" +  new sysConfigBL().Select(new sysConfigDO { ConfigID = 12 }).ConfigValue.ToString();
                pnlQCTrai.Visible = new sysConfigBL().Select(new sysConfigDO { ConfigID = 11 }).IsActive;
              //  imgLeft = new sysConfigBL().Select(new sysConfigDO { ConfigID = 11 }).ConfigValue.ToString();
            }
        }
        protected void loadMoreInfo()
        {
            sysConfigDO objConfig = new sysConfigDO();
            sysConfigBL configBL = new sysConfigBL();

            objConfig.ConfigID = 8;
            objConfig = configBL.Select(objConfig);
            ltrInfo1.Text = objConfig.ConfigName;
            ltrInfo1x.Text = objConfig.ConfigValue;

            objConfig.ConfigID = 9;
            objConfig = configBL.Select(objConfig);
            ltrInfo2.Text = objConfig.ConfigName;
            ltrInfo2x.Text = objConfig.ConfigValue;

            objConfig.ConfigID = 10;
            objConfig = configBL.Select(objConfig);
            ltrInfo3.Text = objConfig.ConfigName;
            ltrInfo3x.Text = objConfig.ConfigValue;
        }
    }
}
